<?php foreach ($output['orders'] as $order): ?>
    <li style="margin-bottom: 1rem;">
        <div class="list-top line">
            <span class="left"><?php echo $output['order_type'][$order['order_type']]?><?php //echo $order['order_sn']; ?></span>
            <span class="right green fr"><?php echo $output['status'][$order['order_status']]; ?></span>
        </div>
        <?php if($order['order_type']==2){ ?>
            <?php foreach ($order['sku'] as $sku): ?>
                <a href="index.php?act=merchant&op=orderdetail&ordersn=<?php echo $order['order_sn']; ?>">
                    <div class="list-mid">
                        <div class="list-img">
                            <img src="<?php echo $order['ticket_thumb']; ?>" />
                        </div>
                        <div class="list-info">
                            <p class="title"><?php echo $order['ticket_title']; ?></p>
                            <div><span>¥</span><?php echo $sku['ot_price']; ?><span> / 张</span> <span class="fr">×<?php echo $sku['ot_num']; ?></span></div>
                            <p class="code">取票码:<?php echo $order['ticket_code'] ? substr($order['ticket_code'],0,10).str_repeat('x',6) : ''; ?></p>
                        </div>
                    </div>
                </a>
            <?php endforeach; ?>
        <?php }elseif($order['order_type']==1){ ?>
            <?php foreach ($order['sku'] as $sku): ?>
                <a href="index.php?act=merchant&op=orderdetail&ordersn=<?php echo $order['order_sn']; ?>">
                    <div class="list-mid">
                        <div class="list-img">
                            <img src="<?php echo $order['ticket_thumb']; ?>" />
                        </div>
                        <div class="list-info">
                            <p class="title"><?php echo $order['ticket_title']; ?></p>
                            <p class="title"><?php echo $order['spec_name']; ?></p>
                            <div><span>¥</span><?php echo $sku['unit_price']; ?><span> / 间</span> <span class="fr">×<?php echo $sku['oh_num']; ?></span></div>
                            <p class="code">核销码:<?php echo $order['ticket_code'] ? substr($order['ticket_code'],0,10).str_repeat('x',6) : ''; ?></p>
                        </div>
                    </div>
                </a>
            <?php endforeach; ?>
        <?php }else {?>
            <!-- 美食 -->
            <?php foreach ($order['sku'] as $sku): ?>
                <a href="index.php?act=member&op=orderdetail&ordersn=<?php echo $order['order_sn']; ?>">
                    <div class="list-mid">
                        <div class="list-img">
                            <img src="<?php echo $order['ticket_thumb']; ?>" />
                        </div>
                        <div class="list-info">
                            <p class="title"><?php echo $order['ticket_title'] ?></p>
                            <div><span>¥</span><?php echo $sku['og_price']; ?><span> / 份</span> <span class="fr">×<?php echo $sku['og_num']; ?></span></div>
                            <p class="code">核销码:<?php echo $order['ticket_code'] ? substr($order['ticket_code'],0,10).str_repeat('x',6) : ''; ; ?></p>
                        </div>
                    </div>
                </a>
            <?php endforeach; ?>
        <?php } ?>
        <div class="list-bot line">
            <samp>合计：</samp><span>¥<?php echo $order['need_pay']; ?></span>
        </div>
    </li>
<?php endforeach; ?>